/**
 * 
 */
package HSFInterTest;


import Utils.SpringBeanUtil;


import com.de.deguic.service.DegUicExtraReadService;
import com.de.deguic.service.DegUicExtraWriteService;
import com.de.deguic.service.DegUicReadService;
import com.de.deguic.service.DegUicWriteService;
import com.taobao.hsf.hsfunit.HSFEasyStarter;
import com.taobao.hsf.hsfunit.util.ServiceUtil;



/**
 * @author qiyuan.zqy
 * 
 */
public class BeanRepo {

	public static DegUicReadService testDegUicReadService;
	public static DegUicExtraWriteService testDegUicExtraWriteService;
	public static DegUicExtraReadService testDegUicExtraReadService;
	public static DegUicWriteService testDegUicWriteService;


	static {
		
		//HSF��Ԫ������Ҫ�ȵ���HSFEasyStarter��start()��startFromPath()����
				//releaseĿ¼����/����/���������汾hsf��ע�⣺��XP�£����·��������пո�HSF�������������⡣
				if("Windows XP".equals(System.getProperty("os.name")) || "Windows Vista".equals(System.getProperty("os.name"))) {
					//�ֹ�ָ����ַ����Ϊ��Щ�˵�XP�û�Ŀ¼�����пո񣩣�1.4.8.7�汾��hsf�������׳���
					//java.lang.ClassCastException: org.apache.log4j.DailyRollingFileAppender cannot be cast to org.apache.log4j.Appender
					HSFEasyStarter.start("d:/hsf_tmp/release", "2.1.0.4"); //upgrade to 149
				} else {
					HSFEasyStarter.start(); //��user.homeĿ¼/.hsf/releaseĿ¼����/����/���������汾hsf��
//					HSFEasyStarter.startWithVersion("2.1.0.5");
				}
				
				testDegUicWriteService = SpringBeanUtil.getBean("testDegUicWriteService");
				testDegUicExtraReadService = SpringBeanUtil.getBean("testDegUicExtraReadService");
				testDegUicReadService = SpringBeanUtil.getBean("testDegUicReadService");	
				testDegUicExtraWriteService = SpringBeanUtil.getBean("testDegUicExtraWriteService");
				
				
				ServiceUtil.waitServiceReady(testDegUicReadService);
				ServiceUtil.waitServiceReady(testDegUicExtraWriteService);


	}

}
